package oop6;

public class Tv implements Handset {
    public static void main(String[] args) {
        Tv tv = new Tv("夏普", "黑色", 2000, 60);
        System.out.println(tv);
        System.out.println("遥控器重量：" + WEIGHT + "克，无线范围：" + RADIUS + "米，颜色：" + COLOR + "\n");
        tv.watch();

    }

    private String brand;
    private String color;
    private int price;
    private double screenSize;

    public Tv(String brand, String color, int price, double screenSize) {
        this.brand = brand;
        this.color = color;
        this.price = price;
        this.screenSize = screenSize;   //屏幕尺寸
    }

    @Override
    public void start() {
        System.out.println("遥控器打开" + brand + "电视机");
    }

    @Override
    public void close() {
        System.out.println("遥控器关闭" + brand + "电视机");
    }

    @Override
    public void change() {
        System.out.println("遥控器换台");
    }

    public void watch() {
        start();
        change();
        close();
    }

    public String getBrand() {
        return brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public double getScreenSize() {
        return screenSize;
    }

    @Override
    public String toString() {
        return
                "电视品牌：" + brand +
                        "，颜色：" + color +
                        "，价格：" + price +
                        "元，屏幕尺寸：" + screenSize + "寸";
    }
}
